const UserModel = require('@root/model/user')
const { RegisterValidator } = require('@root/core/validator/index')
const { success } = require('@root/utils/lib/helper')

class User {
    async getUserList(ctx) {
      const userList = await UserModel.getUserList(ctx)
      console.log(userList);
    }

    async createUser(ctx) {
      const v = await new RegisterValidator().validate(ctx)
      const params = {
        email: v.get("body.email"),
        password: v.get("body.password"),
        nickName: v.get("body.nickName")
      }
      success()
    }
}

module.exports = new User